Added REST support to login