User authentication by DB implemented, authorization fixed