added login logic, need to fix users/admins issues