adding user login, and fixing stored procedures