Implements authorization logic

Hello
Why is it empty, dude?