*Here below are two pages login and protected and partial code is also attached. After login a token is generated, if user gets token then only user can see dashboard page.