Charles: added admin model and improved the login functionality.