Rewrite of the Login Module