Core fixes

Fixed:
- Login function (checklogin()) now actually works
- Show messages function now works (show_messages())