added login controller and modal view, update keys resource, fix auth middleware