Made authentication work properly

Everything works now properly.