Login & various errors corrected