Implemented a more flexible log in system

The new log in system can be added in whichever page and given any access level.