Hi Darshan,
A pattern that's commonly used is having a Login Block on the Theme layer, that you can consume on the UI layer. So you'll have all the login logic inside the block, and on your UI modules, you just have a screen with a placeholder, consume the block, and put it there.
Hope this helps!