added duplicate checking for login page, added current user for main activity