Finalized login/logout code and did cleanup to bring setup of admin-related actions to the admin plugin