Added exceptions.
Added login resource.