Optimized login php source code and included function for controll access