MODE-2344: Process login/logout procedure (not for merging)

@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.