Fix all authentication errors and implement authorization and user index page