Token based authentication for login an rest