Added functionality for admin pages and login