getting the login and register forms to work properly