Bug fixes and authentication routes