Redesigned the login functionality. Still need to add some checking to the login functions.