Added login stored proc.

Added login stored procedure. Misc updates to other stored procedures
and loginController.