Refactoring; Login fix

- Renamed some Core functions
- Patched a bug where users would not be able to log in after logging
out