Implemented Login functionality

In this commit registration and login are clubbed in same file to make
the common operation in one class