Login and register finished with encryption