move request function from utils to client
add database to view struct and use client request
add structs for auth and sessions
use client request method
make request a client method and add session methods
use NewClient constructor function for tests