Login implementation

Title says it all :)