updated login and registration sketch