Fixes and upgrades to login functionalities. Added synchs to SQL
methods.