refactor entity model into authentication model, add logout button, fix login functionality