If you are developing a web application which requires login, you should build this into your administration area which controls parts of the app. Once the app is in
Maintenance mode when users attempt to login it redirects or displays a specific message. You can build in further conditions allowing admins or members with specific group ID's access if needed.
Using this method allows you to keep your front end up, and no need to mess with an .htaccess file. If you have multiple developers around the world keeping up with their IP's takes time, plus you can break part of the app while editing the .htaccess file which most likely will contain re-writes and other functions for your app.