Sourabh: added login and reg 2