MODE-2344: Process login/logout procedure 

@hchiorean , @rhauch  in this PR implementation which lists repositories according to the credentials. If credentials allows then repository will appear on the list. Let's try to use it as start point.