How to fix error 401 (Unauthorized) in Wordpress admin folder (wp-admin) ?

I think it has to do with .htaccess files or with password protect directory function.

I fixed it by adding ".htaccess" file into wp-admin folder (or into any folder in lower level)
and into .htaccess add this:

Code:
AuthName "WordPress"
AuthType Basic