add authlogic

add authlogic to do authentication, and separate layouts into partials