login and register using synchronous methods
Merge with Radi's commit