Implementing the monadic structures for chained calls: AuthMonad
Adjusting code style