Login by token generated by rest