Login sequence fixed, functionality added