Authorization and storage procedure

1) The stored procedure to get user by id.
2) Some work in interface for authorization.